package a.h;

import javax.swing.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyVetoException;
import java.lang.ref.WeakReference;

class g
  extends d
  implements w
{
  public static final String n = "enum";
  public static final String o = "renderer";
  private vc p;
  private int q;
  private JComboBox r;
  private e_ s;
  private boolean t;
  
  public g(ec paramec, ob paramob)
  {
    super(paramec);
    if (i == 0)
    {
      if ((paramec instanceof w))
      {
        if (i != 0) {
          break label48;
        }
        a(paramec, paramob, ((w)paramec).b());
      }
    }
    else if (!ec.s) {
      return;
    }
    label48:
    a(paramec, paramob, null);
  }
  
  public g(ec paramec, ob paramob, Object[] paramArrayOfObject)
  {
    super(paramec);
    a(paramec, paramob, paramArrayOfObject);
  }
  
  private void a(ec paramec, ob paramob, Object[] paramArrayOfObject)
  {
    int i = ec.t;
    this.p = new vc(paramArrayOfObject);
    this.q = -1;
    yb localyb = new yb();
    this.r = (paramArrayOfObject != null ? new JComboBox(paramArrayOfObject) : new JComboBox());
    this.r.setRenderer(localyb);
    cd.a(this.r);
    Object localObject = paramec.c(kc.z);
    if (i == 0)
    {
      if ((localObject instanceof ListCellRenderer)) {
        localyb.a((ListCellRenderer)localObject);
      }
    }
    else
    {
      if (i != 0) {
        break label194;
      }
      if (!ec.s) {
        break label130;
      }
    }
    localyb.a(new qb(paramec, paramob));
    label130:
    new b_(this);
    new d_(this);
    new c_(this);
    this.s = new e_();
    this.t = false;
    d(paramec.m());
    c(paramec.f());
    label194:
    if (i == 0)
    {
      if (!p()) {
        a(paramec.o());
      }
      if (i == 0)
      {
        this.r.addItemListener(this.s);
        localObject = paramec.c(kc.y);
      }
    }
    else if (!(localObject instanceof ItemListener))
    {
      return;
    }
    this.r.addItemListener((ItemListener)localObject);
  }
  
  public Object n()
  {
    return this.p.a(this.q);
  }
  
  public void a(Object paramObject)
  {
    int j = ec.t;
    Object localObject = n();
    int i;
    if (j == 0) {
      if (nb.a(localObject, paramObject))
      {
        try
        {
          b(e, localObject, paramObject);
        }
        catch (PropertyVetoException localPropertyVetoException)
        {
          a(this.q);
          return;
        }
        i = this.p.a(paramObject);
        if (j == 0)
        {
          if (i < 0)
          {
            d(true);
            return;
          }
          d(false);
          a(i);
        }
        a(localObject, paramObject);
      }
    }
    if ((j != 0) || (p()))
    {
      i = this.p.a(paramObject);
      if (j == 0)
      {
        if (i > -1) {
          d(false);
        }
      }
      else {
        a(i);
      }
    }
  }
  
  public Object[] b()
  {
    return this.p.b();
  }
  
  public void a(Object[] paramArrayOfObject)
  {
    int j = ec.t;
    boolean bool = ec.s;
    Object localObject = n();
    Object[] arrayOfObject = this.p.b();
    if (j == 0)
    {
      if (!nb.a(arrayOfObject, paramArrayOfObject)) {
        return;
      }
      this.p.a(paramArrayOfObject);
      this.s.a(false);
      this.r.removeAllItems();
      if (j != 0) {}
    }
    else
    {
      if (paramArrayOfObject != null)
      {
        i = 0;
        do
        {
          if (i >= paramArrayOfObject.length) {
            break;
          }
          this.r.addItem(paramArrayOfObject[i]);
          i++;
          if (j != 0) {
            break label133;
          }
          if (bool) {
            break label129;
          }
        } while (!bool);
      }
      this.s.a(true);
    }
    if (j == 0) {
      a(n, arrayOfObject, paramArrayOfObject);
    }
    label129:
    label133:
    if (j == 0) {
      if (l())
      {
        if (j != 0) {
          break label200;
        }
        if ((this.i instanceof kc))
        {
          if (j != 0) {
            break label200;
          }
          if (nb.a(paramArrayOfObject, ((w)this.i).b())) {
            ((kc)this.i).a(paramArrayOfObject, localObject);
          }
        }
      }
    }
    label200:
    int i = this.p.a(localObject);
    if (j == 0) {
      if (i < 0)
      {
        d(true);
        if (j == 0) {
          if (!bool) {
            return;
          }
        }
      }
      else
      {
        d(false);
      }
    }
    a(i);
  }
  
  public boolean o()
  {
    return this.r.isEnabled();
  }
  
  public void c(boolean paramBoolean)
  {
    boolean bool = this.r.isEnabled();
    if (ec.t == 0)
    {
      if (bool != paramBoolean) {
        this.r.setEnabled(paramBoolean);
      }
    }
    else {
      a(bool, paramBoolean);
    }
  }
  
  public boolean p()
  {
    return this.t;
  }
  
  public void d(boolean paramBoolean)
  {
    int i = ec.t;
    if ((i != 0) || (this.t != paramBoolean))
    {
      boolean bool = this.t;
      this.t = paramBoolean;
      this.s.a(false);
      if (i == 0)
      {
        if (paramBoolean) {
          this.r.setSelectedItem(null);
        }
        this.s.a(true);
      }
      b(bool, paramBoolean);
    }
  }
  
  public JComponent f()
  {
    return this.r;
  }
  
  public ListCellRenderer a()
  {
    return this.r.getRenderer();
  }
  
  public void a(ListCellRenderer paramListCellRenderer)
  {
    ListCellRenderer localListCellRenderer = a();
    if (ec.t == 0)
    {
      if (nb.a(localListCellRenderer, paramListCellRenderer)) {
        this.r.setRenderer(paramListCellRenderer);
      }
    }
    else {
      a(o, localListCellRenderer, paramListCellRenderer);
    }
  }
  
  public void c()
  {
    int i = ec.t;
    boolean bool = ec.s;
    if (i == 0) {
      if ((this.i instanceof kc))
      {
        if (i == 0) {
          if (nb.a(b(), ((w)this.i).b()))
          {
            if (i == 0) {
              if (!p())
              {
                ((kc)this.i).a(b(), n());
                if (i != 0) {
                  break label122;
                }
                if (!bool) {
                  break label99;
                }
              }
            }
            ((kc)this.i).a(b());
            label99:
            this.i.b(p());
            this.i.a(o());
            label122:
            if (i == 0) {
              if (!bool) {
                return;
              }
            }
          }
          else
          {
            if (i != 0) {
              break label142;
            }
            super.c();
          }
        }
        if (!bool) {
          return;
        }
      }
    }
    label142:
    super.c();
  }
  
  public void d()
  {
    int i = ec.t;
    if (i == 0) {
      if ((this.i instanceof w))
      {
        Object[] arrayOfObject = ((w)this.i).b();
        if (i != 0) {
          break label52;
        }
        if (nb.a(b(), arrayOfObject)) {
          a(arrayOfObject);
        }
      }
    }
    label52:
    super.d();
  }
  
  public void e()
  {
    int i = ec.t;
    if (i == 0) {
      if ((this.i instanceof kc))
      {
        Object[] arrayOfObject = ((kc)this.i).q();
        if (i != 0) {
          break label50;
        }
        if (nb.a(b(), arrayOfObject)) {
          a(arrayOfObject);
        }
      }
    }
    label50:
    super.e();
  }
  
  private void a(int paramInt)
  {
    this.q = paramInt;
    this.r.setSelectedIndex(paramInt);
  }
  
  private static final class c_
    extends g.a_
  {
    public c_(g paramg)
    {
      super(paramg);
    }
    
    void a(g paramg, PropertyChangeEvent paramPropertyChangeEvent)
    {
      int i = ec.t;
      if ((i != 0) || (paramg.m()))
      {
        ItemListener localItemListener1 = (ItemListener)paramPropertyChangeEvent.getNewValue();
        if (i == 0) {
          if (localItemListener1 != null) {
            paramg.r.removeItemListener(localItemListener1);
          }
        }
        ItemListener localItemListener2 = (ItemListener)paramPropertyChangeEvent.getNewValue();
        if (localItemListener2 != null) {
          paramg.r.addItemListener(localItemListener1);
        }
      }
    }
  }
  
  private static final class d_
    extends g.a_
  {
    public d_(g paramg)
    {
      super(paramg);
    }
    
    void a(g paramg, PropertyChangeEvent paramPropertyChangeEvent)
    {
      if ((ec.t != 0) || (paramg.m()))
      {
        yb localyb = (yb)paramg.a();
        Object localObject = paramPropertyChangeEvent.getNewValue();
        if ((localObject instanceof ListCellRenderer)) {
          localyb.a((ListCellRenderer)localObject);
        }
      }
    }
  }
  
  private static final class b_
    extends g.a_
  {
    public b_(g paramg)
    {
      super(paramg);
    }
    
    void a(g paramg, PropertyChangeEvent paramPropertyChangeEvent)
    {
      if ((ec.t != 0) || (paramg.m()))
      {
        Object localObject = paramg.k().o();
        paramg.a((Object[])paramPropertyChangeEvent.getNewValue());
        paramg.a(localObject);
      }
    }
  }
  
  private static abstract class a_
    implements PropertyChangeListener
  {
    private final String a;
    private final WeakReference c;
    
    a_(String paramString, g paramg)
    {
      this.a = paramString;
      this.c = new WeakReference(paramg);
      paramg.i.c(paramString, this);
    }
    
    public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
    {
      int i = ec.t;
      g localg = (g)this.c.get();
      if ((i != 0) || (localg == null))
      {
        Object localObject = paramPropertyChangeEvent.getSource();
        if (i == 0)
        {
          if ((localObject instanceof xc)) {
            ((xc)localObject).d(this.a, this);
          }
        }
        else if (!ec.s) {}
      }
      else
      {
        a(localg, paramPropertyChangeEvent);
      }
    }
    
    abstract void a(g paramg, PropertyChangeEvent paramPropertyChangeEvent);
  }
  
  private final class e_
    implements ItemListener
  {
    private boolean a = true;
    
    public e_() {}
    
    public boolean a()
    {
      return this.a;
    }
    
    public void a(boolean paramBoolean)
    {
      this.a = paramBoolean;
    }
    
    public void itemStateChanged(ItemEvent paramItemEvent)
    {
      if (ec.t == 0)
      {
        if (this.a) {
          g.this.d(false);
        }
      }
      else {
        g.this.a(g.this.r.getSelectedItem());
      }
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.h.g

 * JD-Core Version:    0.7.0.1

 */